package com.gistmap.dto;

/**
 * Created by Administrator on 2017/4/21.
 */
public class MessageDto {

    private int id;
    private int optId;          //操作人id
    private String optName;     //操作名称
    private String oname;       //操作人姓名
    private String source;
    private int flag;
    private String str;


    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getOpt() {
        return optId;
    }

    public void setOpt(int opt) {
        this.optId = opt;
    }

    public String getOptName() {
        return optName;
    }

    public void setOptName(String optName) {

        this.optName = optName;
        if (optName.equals("评论"))
            setStr("的文章");
        else if(optName.equals("回复"))
            setStr("的评论");
        else if(optName.equals("参与"))
            setStr("的活动");
    }

    public String getOname() {
        return oname;
    }

    public void setOname(String oname) {
        this.oname = oname;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public int getFlag() {
        return flag;
    }

    public void setFlag(int flag) {
        this.flag = flag;
    }

    public int getOptId() {
        return optId;
    }

    public void setOptId(int optId) {
        this.optId = optId;
    }

    public String getStr() {
        return str;
    }

    public void setStr(String str) {
        this.str = str;
    }

    @Override
    public String toString() {
        return "MessageDto{" +
                "id=" + id +
                ", opt=" + optId +
                ", optName='" + optName + '\'' +
                ", oname='" + oname + '\'' +
                ", source='" + source + '\'' +
                ", flag=" + flag +
                '}';
    }
}
